function addProject() {
    var projectName = $("#projectName").val(),
        projectLanguage = $("#projectLanguage").val(),
        email1 = $("#email1").val(),
        email2 = $("#email2").val(),
        email3 = $("#email3").val(),
        email4 = $("#email4").val(),
        projectJsUrl = $("#projectJsUrl").val(),
        projectApikey = $("#projectApikey").val(),
        access_token = $.cookie("access_token"),
        flag = false;

    if(projectName == ""){
        layer.msg("请输入项目名称");
        flag = true;
    }
    if(projectLanguage == ""){
        layer.msg("请输入语言");
        flag = true;
    }
    if(access_token == ""){
        layer.msg("token过期请重新登录");
        flag = true;
    }
    if(flag){
        return false;
    }else{
        send(
            '/sys/addProject',
            {projectName: projectName, projectLanguage: projectLanguage,
                email1: email1, email2: email2, email3: email3, email4: email4,
                projectJsUrl: projectJsUrl, projectApikey: projectApikey, access_token: access_token},
            function (data) {
                if(data.result == "0"){
                    layer.msg("添加成功，去控制台看看吧");
                    $.cookie("project_id",data.data,{ expires: 365, path: '/' });
                    setTimeout(function(){console()},1500);
                }else{
                    layer.msg(data.message);
                }
            },
            function (res) {

            }
        );
    }
}
